/**   
* @Description: TODO 
* @author caogt  
* @date 2016年7月18日 下午3:55:56 
* @version V1.0   
*/
package com.bizc.test.dao.impl;

import javax.annotation.Resource;

import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Repository;

import com.alibaba.druid.pool.vendor.NullExceptionSorter;
import com.bizc.test.dao.IUserDao;
import com.bizc.test.po.User;

@Repository
public class UserDaoImpl implements IUserDao{

	public UserDaoImpl(){
		super();
		System.out.println("--------usedao------------");
	}
	@Resource
	private JdbcTemplate jdbcTemplate;
	@Override
	public int inserUser(User user) {
		int c = jdbcTemplate.update("insert into sys_user (id,username,cn) values(?,?,?)",new Object[]{user.getId(),user.getUserName(),user.getCn()});
		return c;
	}
	@Override
	public void test() {
		throw new NullPointerException();
	}

}
